const { resolve } = require('path')
const { addDecoratorsLegacy, override } = require('customize-cra')

// 自定义配置，让react工程中支持 @ 别名写法
const customize = () => (config) => {
  config.resolve.alias['@'] = resolve('./src')
  return config
}

module.exports = override(
  // 装饰器
  addDecoratorsLegacy(),
  customize()
)
